import { Component } from 'vue-facing-decorator'
import Render from '@/render/Render'
import toNative from '@/utils/toNative'
import TableRender, { type TableRenderColumnTypes } from '@/render/TableRender'
import type { ReportCaseResultDto } from '@/api/insurance/period/types'
import type { VxeColumnSlotTypes } from 'vxe-table'

@Component
export class DiscountRecord extends TableRender {
    noTablePadding = true
    noFilterPadding = true
    filterConfig() {
        return {
            companyId: {
                name: '生效时间',
                element: 'datetime',
            }
        }
    }
    tableColumnConfigOld = () => [
        {
            field: 'id',
            title: '1-3类优惠记录',
        },
        {
            field: 'id',
            title: '4类优惠记录',
        },
        {
            field: 'id',
            title: '5类优惠记录',
        },
        {
            field: 'id',
            title: '生效时间',
        },
        {
            field: 'id',
            title: '方案名称',
        },
        {
            field: 'id',
            title: '操作人',
        },
        {
            field: 'id',
            title: '状态',
        },
        {
            field: 'id',
            title: '运作时间',
        },
        {
            field: 'id',
            title: '操作',
        },
    ] as TableRenderColumnTypes<ReportCaseResultDto>
    render() { 
        return (
            <div class="md:flex md:flex-col h-full">
                {this.renderFilter()}
                {this.renderTable()}
                {this.renderPager()}
            </div>
        )
    }
}

export default toNative<{}, {}>(DiscountRecord)